'use strict';

module.exports = app => {
    const { STRING, INTEGER, DATE } = app.Sequelize;

    const Task = app.model.define('team_task', {
        id: { type: INTEGER, primaryKey: true, autoIncrement: true },
        parent_id: INTEGER,
        project_id: INTEGER,
        name: STRING(200),
        desc: STRING,
        status: INTEGER,
        execute_start: DATE,
        execute_end: DATE,
        limit_day: INTEGER,
        create_user_id: STRING(32),
        execute_user_id: STRING(32),
        follow_user_id: STRING(32),
        level: INTEGER,

        create_time: DATE,
        update_time: DATE,

    }, {
        paranoid: false
    });

    return Task;
};